package com.example.epic.demo;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

/**
 * @author: liuchangying
 * @date: 2021/11/19
 * @description :
 */
public class BaiDu {

    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver","epic/src/main/resources/96.0.4664.45/chromedriver");
        WebDriver driver = new ChromeDriver();
        //创建窗口最大化
        driver.manage().window().maximize();
        //打开网页
        driver.get("https://www.baidu.com");

        WebElement usernameElement = driver.findElement(By.id("kw"));
        usernameElement.click();
        usernameElement.sendKeys("123456");
        WebElement ser = driver.findElement(By.id("su"));
        ser.click();
    }
}
